#ifndef BE_LOG_H_INCLUDED
#define BE_LOG_H_INCLUDED

//This file should be moved in to src/kernel

#ifdef WIN32
#include <Windows.h>
#endif

#include <string>
#include <iostream>

#include <boost/lexical_cast.hpp>

class BeLog
{
protected:
	virtual ~BeLog() {};
public:
	template<typename T>
	BeLog& operator<<(const T& t)
	{
		log(boost::lexical_cast<std::string>(t));
		return *this;
	}
private:
	virtual void log(const std::string& message)=0;
};

class BeLogDebug : public BeLog
{
public:
	virtual ~BeLogDebug() {}
private:
	virtual void log(const std::string& message)
	{
#ifdef WIN32
		OutputDebugString(message.c_str());
#endif
		std::cout << message;
	}
};

#endif

